import React from 'react';
class Input extends React.Component {
    submit=(e)=>{
      if(e.keyCode === 13){
        this.props.onSubmit()
      }
    }
    render() {
        let {value,onChange} = this.props;
        return <div className=''>
            <input value={value} onChange={onChange} onKeyDown={this.submit} type="text"/>
        </div>;
    }
}
export default Input